/************************************************************************
 * The code is owned by mainframer.cn and Shang Tao
 * Without aproval of mainframer.cn and Shang Tao, removing the copyright
 * infomation is regarded as invassion of proprietary copyright
 ***********************************************************************/
package com.mr.qa.bo;

import java.util.HashSet;
import java.util.Set;

/**
 * QuestionCategory
 */

public class QuestionCategory extends BaseBO
{
    // Fields    
    
    //Parent
     private QuestionCategory mrIaskCategory;
     private String name;
     private String state;
     private Integer level;//the depth of the category in the tree
     private Integer priority;//the priority of the category in the same level categories under the common parent
     
     //this category only displayed for admin, "Y" for admin,T for topic,A for ads, defaults to"N" 
     private String onlyForAdmin;
     
     private MrIaskCategoryStatistics mrIaskCategoryStatistics;
     
     
     private Set mrIaskCategories = new HashSet(0);
     private Set mrIaskQuestions = new HashSet(0);
        
    //2007.12.27 how many questions under the category
    private Integer questionCount = 0;

    //whether is for advtisement
    private Boolean isAds = false;
    
    //where is for training
    private Boolean isTraining = false;
    
  //whether is locked
    private Boolean isLock = false;
    
    //the category is for iask or forum
    private Integer type;
    
    private String adCategoryContactMail;
    

    /** default constructor */
    public QuestionCategory() 
    {
    }

	/** minimal constructor */
    public QuestionCategory(String name)
    {
        this.name = name;
    }
    

    public QuestionCategory getMrIaskCategory() {
        return this.mrIaskCategory;
    }
    
    public void setMrIaskCategory(QuestionCategory mrIaskCategory)
    {
        this.mrIaskCategory = mrIaskCategory;
    }

    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }

    public String getState() {
        return this.state;
    }
    
    public void setState(String state) {
        this.state = state;
    }

    public Set getMrIaskCategories() {
        return this.mrIaskCategories;
    }
    
    public void setMrIaskCategories(Set mrIaskCategories)
    {
        this.mrIaskCategories = mrIaskCategories;
    }

    public Set getMrIaskQuestions() {
        return this.mrIaskQuestions;
    }
    
    public void setMrIaskQuestions(Set mrIaskQuestions) 
    {
        this.mrIaskQuestions = mrIaskQuestions;
    }


    public void setLevel(Integer level)
    {
        this.level = level;
    }
    
    public Integer getLevel()
    {
        return level;
    }

    public void setMrIaskCategoryStatistics(MrIaskCategoryStatistics mrIaskCategoryStatistics)
    {
        this.mrIaskCategoryStatistics = mrIaskCategoryStatistics;
    }
    
    public MrIaskCategoryStatistics getMrIaskCategoryStatistics()
    {
        return mrIaskCategoryStatistics;
    }

    public void setPriority(Integer priority)
    {
        this.priority = priority;
    }
    
    public Integer getPriority()
    {
        return priority;
    }
    
    public void setOnlyForAdmin(String onlyForAdmin)
    {
        this.onlyForAdmin = onlyForAdmin;
    }
    
    public String getOnlyForAdmin()
    {
        return onlyForAdmin;
    }

    public void setQuestionCount(Integer questionCount)
    {
        this.questionCount = questionCount;
    }
    
    public Integer getQuestionCount()
    {
        return questionCount;
    }

    public void setIsAds(Boolean isAds)
    {
        this.isAds = isAds;
    }
    
    public Boolean getIsAds()
    {
        return isAds;
    }

    public void setAdCategoryContactMail(String adCategoryContactMail)
    {
        this.adCategoryContactMail = adCategoryContactMail;
    }
    
    public String getAdCategoryContactMail()
    {
        return adCategoryContactMail;
    }
    public String toString() 
    {
        return "id="+id+",name="+name+",type="+this.getOnlyForAdmin();    
    }

    public void setIsTraining(Boolean isTraining) {
        this.isTraining = isTraining;
    }

    public Boolean getIsTraining() {
        return isTraining;
    }

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Boolean getIsLock() {
		return isLock;
	}

	public void setIsLock(Boolean isLock) {
		this.isLock = isLock;
	}
    
}
